#include<bits/stdc++.h>
using namespace std;

int tri[40][40]; 

void output(int row)
{
	for(int i = 1;i <= row;i++)
	{
		for(int j = 1;j < i;j++)
			cout<<tri[i][j]<<" ";
		cout<<tri[i][i]<<endl;
	}
	cout<<endl;
}

void preTreatment()
{
	tri[1][1] = 1;
	for(int i = 2;i <= 30;i++)
		for(int j = 1;j <= i;j++)
			tri[i][j] = tri[i-1][j]+tri[i-1][j-1];
}

int main()
{
	preTreatment();
	
	int row;
	while(cin>>row)
		output(row);
	return 0;
}
